package com.example.ordersystem.service;

import java.util.Random;
import java.util.Scanner;

/**
 * @className: Test
 * @author: 芃
 * @description:
 * @date: 2025/1/4 17:44
 */

public class Test {

    public static void main(String[] args) {
        String password = "123456abc";
        Scanner scanner = new Scanner(System.in);
        for (int i=0;i<3;i++){
            System.out.println("请输入密码：");
            String input = scanner.next();
            if (password.equals(input)) {
                System.out.println("登陆成功");
                break;
            } else {
                System.out.println("密码错误");
                if(i==2){
                    System.out.println("退出程序");}
            }
        }
    }
}
